<script setup lang="ts">
import { ref } from 'vue'
const progress = ref<any>(null)
window.api.downloadProgress((_progress: any) => {
  progress.value = _progress
})
</script>

<template>
  <main class="p-5 w-screen h-screen absolute z-10 flex justify-center items-center bg-[#000000B3]" v-if="progress">
    <div class="w-[50%] h-[50%] bg-white rounded-lg flex flex-col justify-center px-5 gap-5">
      <div class="flex justify-center">
        <img src="@renderer/public/logo.png" class="w-[80px] h-[80px] object-cover rounded-lg shadow-md" />
      </div>
      <h1 class="py-3 text-center font-bold opacity-60 text-sm font-mono">更新安装包中...</h1>
      <el-progress :text-inside="true" :stroke-width="26" :percentage="parseInt(progress.percent)" />
    </div>
  </main>
</template>
